<include file="application/walletyhbbadmin/view/public/left.html"/>
<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">管理中心<b>></b><strong>首页信息</strong> </div>
    <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">


        <div id="list">
            <h3>修改产品详情</h3><br/>
            <div class="content" style="padding-left: 100px;">
                <form action="{:U('doeditsearch')}" method="post" enctype="multipart/form-data">
                    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                        <input type="hidden" name="id" value="{$res.id}">
                        <tr>
                            <td width="110" align="right">电源：</td>
                            <td>
                                <input type="text" id="p_p_type" name="p_p_type" value="{$res.p_p_type}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">制冷剂：</td>
                            <td>
                                <input type="text" id="p_cryogen" name="p_cryogen" value="{$res.p_cryogen}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">应用：</td>
                            <td>
                                <input type="text" id="p_application" name="p_application" value="{$res.p_application}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">形式(中)：</td>
                            <td>
                                <input type="text" id="p_form" name="p_form" value="{$res.p_form}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">形式(英)：</td>
                            <td>
                                <input type="text" id="p_uform" name="p_uform" value="{$res1.p_form}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">形式(日)：</td>
                            <td>
                                <input type="text" id="p_jform" name="p_jform" value="{$res2.p_form}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">单/双缸：</td>
                            <td>
                                <input type="text" id="p_cylinder" name="p_cylinder" value="{$res.p_cylinder}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">冷却方式：</td>
                            <td>
                                <input type="text" id="p_c_mode" name="p_c_mode" value="{$res.p_c_mode}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">排量：</td>
                            <td>
                                <input type="text" id="p_displacement" name="p_displacement" value="{$res.p_displacement}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">型号：</td>
                            <td>
                                <input type="text" id="p_model" name="p_model" value="{$res.p_model}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">能力（W）：</td>
                            <td>
                                <input type="text" id="p_w_ability" name="p_w_ability" value="{$res.p_w_ability}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">能力（Btu）：</td>
                            <td>
                                <input type="text" id="p_b_ability" name="p_b_ability" value="{$res.p_b_ability}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">功率（W）：</td>
                            <td>
                                <input type="text" id="p_w_power" name="p_w_power" value="{$res.p_w_power}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">COP：</td>
                            <td>
                                <input type="text" id="p_cop" name="p_cop" value="{$res.p_cop}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td width="110" align="right">测试工况：</td>
                            <td>
                                <input type="text" id="p_condition" name="p_condition" value="{$res.p_condition}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <!--<tr>-->
                            <!--<td width="110" align="right">图片：</td>-->
                            <!--<td>-->
                                <!--<img src="{$res.p_pic}" alt="" style="width: 230px;height: 150px;"><input type="file" id="p_pic" name="p_pic" value="" size="80" class="inpMain" />-->
                            <!--</td>-->
                        <!--</tr>-->
                        <tr>
                            <td width="110" align="right">代号：</td>
                            <td>
                                <input type="text" id="p_name" name="p_name" value="{$res.p_name}" size="80" class="inpMain" />
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <input name="submit" class="btn" type="submit" value="提交" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>

    </div>
</div>
<div class="clear"></div>
<include file="application/walletyhbbadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div> </div>
<script type="text/javascript">

    onload = function()
    {
        document.forms['action'].reset();
    }

    function douAction()
    {
        var frm = document.forms['action'];
        frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
    }

    function shanchu(id) {
        var url = "{:U('Member/delete')}";
        var msg = "您确定要删除吗？";
        if (confirm(msg)==true){
            $.post(url, {'member_id': id}, function (data) {
                layer.msg(data.info);
                if (data.status == 1) {
                    setTimeout(function () {
                        window.location.reload();
                    }, 2000);
                }
            });
        }
    }

    function shanchu(id){
        var url="{:U('Member/delete')}";
        var msg = "您确定要删除吗？";
        if (confirm(msg)==true) {
            $.post(url, {'member_id': id}, function (data) {
                layer.msg(data.info);
                if (data.status == 1) {
                    setTimeout(function () {
                        window.location.reload();
                    }, 2000);
                }
            });
        }
    }


</script>
<script>
    $(document).ready(function(){
        $("#tid").change(function(){
            var fid = $(this).val();
            // console.log(fid);
            $.ajax({
                'url':'{:U("Goods/addType")}',//请求的url
                'type':'get',//请求类型
                'data':{parentId:fid},//附加参数
                'async':true,//异步处理
                'dataType':'json',//响应数据返回类型
                success:
                //data 响应数据
                    function(data){
                        $("#tid1 option").remove();//清除
                        console.log(data);//f12打印
                        var option = '<option value="">--请选择--</option>';
                        // //遍历
                        for(var i=0;i<data.length;i++){
                            //禁用
                            // $(".ss").attr("disabled",true);
                            //alert(data[i].name);
                            //把获取的数据存储在option标签里
                            option +='<option value="'+data[i].id+'">'+data[i].name+'</option>';
                            // alert(option);
                        }
                        //内部插入到第一个select
                        $("#tid1").append(option);
                        $("#tid1").css('display',"inline-block");
                    },
                error:
                    function () {
                        alert("Ajax响应失败");
                    }
            });
        });

    });
</script>

</body>
</html>
